package com.aaa.controller;

import com.aaa.entity.User;
import com.aaa.entity.Vip;
import com.aaa.service.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;


@Controller
@RequestMapping("vip")
public class VipController {
    @Resource
    UserService userService;
    @Resource
    VipService vipService;
    @RequestMapping("selectVip")
    @ResponseBody
    public PageInfo select(Integer pageNum, Integer pageSize, String username) {
        System.out.println(username+"username");

            PageHelper.startPage(pageNum,pageSize);
            List<Vip> list=vipService.selectVip(username);
            PageInfo pageInfo=new PageInfo(list);
            return  pageInfo;

    }
}
